class Generator:
    """
    生成器当作迭代器使用
    """
    def __init__(self,list):
        self.size = len(list)
        self.index = 0
        self.list = list

    def test11(self):
        while self.index < self.size:
             yield self.list[self.index]
             self.index+=1
